Assist last used: remember STT and record proactively (before connected) #3755
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently, Assist needs to do a few network checks before it is ready to use. If the device or network is slow this can take a second or two, especially on a watch. You can't start speaking until these checks complete.
To improve this, for the last used pipeline this PR remembers whether or not it supports STT input, and if it does it starts recording proactively/as soon as possible to avoid missing voice input while doing network checks.
Also includes two minor fixes found while working on the PR:
Screenshots
These demos are on a watch, but the same applies to the main app. A 5 second delay was added for demo purposes.
Slow network, you can see the UI shift a few pixels once a connection is established:
assist-stt-cache-success.mp4
Failed connection, recording will stop and it will show the error state as usual:
assist-stt-cache-offline.mp4
Link to pull request in Documentation repository
n/a
Any other notes